home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / internet / sting / time / t_setclk / t_setclk.doc < prev    next >
Text File  |  1997-08-09  |  4KB  |  72 lines

  1. ;----------------------------------------------------------------------------
  2. ;File name:    T_SETCLK.DOC            Revision date:    1997.08.10
  3. ;Creator:    Ulf Ronald Andersson        Creation date:    1997.08.01
  4. ;(c)1997 by:    Ulf Ronald Andersson        All rights reserved
  5. ;Feedback to:    dlanor@oden.se            Released as FREEWARE
  6. ;----------------------------------------------------------------------------
  7. ;--- !!! ---  Please read the full text below at least once.  --- !!! ---
  8. ;This will help you avoid some simple but otherwise inescapable problems.
  9. ;----------------------------------------------------------------------------
  10.  
  11. T_SETCLK is a simple client program that contacts a time server to request
  12. its time by the "Time" protocol, over either of the two "Daytime" ports,
  13. which are UDP(37) and TCP(37).  This causes the server to send time info as
  14. a longword, which T_SETCLK then converts to real local time which it uses to
  15. set the system time.  This is done by the proper TOS calls so that the real
  16. time clock (if any) of your computer will be set properly.
  17.  
  18. This client will run as ACC, APP, GTP, PRG, TOS, or TTP program, under all
  19. known system environments that include STinG.  It is useless without STinG !
  20.  
  21. As yet all user interaction of this client is through alert boxes, and as yet
  22. these are still modal, though this may change in future versions if warranted.
  23.  
  24. When started as a TOS or TTP program the ouput will still be quite similar
  25. to the GEM usage, by using part of the VT52 screen as a simulated alert box.
  26. You can then use the digit keys "1", "2", or "3" to select buttons.
  27.  
  28. When started as APP, PRG, or GTP program under a multitasking AES, the client
  29. does not immediately start any user interaction, unless there is an argument
  30. included in the launching.  Otherwise it merely goes dormant, awaiting future
  31. AES messages  AC_OPEN (can have no argument) or VA_START (can have argument).
  32. In the latter case it responds with AV_STARTED after copying any argument.
  33.  
  34. Any argument passed, at launch or by VA_START message, will be interpreted as
  35. an alternative time server address, either as IP number or as a domain name.
  36. In the former case, it will be used directly without calling resolver, but in
  37. the latter case the resolver will be called to determine the IP number.
  38.  
  39. Whenever a request is to be made without having passed an argument, the client
  40. will attempt to contact a server at the address defined in the "TIME_SERVER"
  41. variable of STinGs DEFAULT.CFG, so you will need to add this variable if you
  42. have not already done so.
  43.  
  44. When started as an ACC, under any AES, the behaviour will be similar to that
  45. described above, except that no launch argument is then possible.  The client
  46. will still respond correctly to arguments passed by VA_START of course.  Also,
  47. when such an argument has been used, it will be reused each time the ACC gets
  48. an AC_OPEN message.  To reset the ACC to use the TIME_SERVER variable again,
  49. you must then pass it an empty VA_START message.  This can be done in THING
  50. simply by double-clicking on an APP with the same name as the ACC.
  51.  
  52. In addition to the new DEFAULT.CFG variable mentioned above, there are also
  53. two others that have been added to support proper time conversions.
  54.  
  55. I use the following three lines in DEFAULT.CFG:
  56.  
  57. TIME_SERVER = time.dataphone.se
  58. TIME_ZONE   = +60          ;Sweden is 60 minutes ahead of GMT normally
  59. TIME_SUMMER = 03.30.10.26  ;But we add 1 hour during March 30 through Oct 25
  60.  
  61. An australian would of course have quite different values, but the algorithms
  62. are prepared for this and should handle it correctly (otherwise tell me !).
  63.  
  64. Unless you too live in Sweden, I suggest you find a server closer to home. ;-)
  65. A useful time server in England can be accessed by:
  66.  
  67. TIME_SERVER = time.demon.co.uk
  68.  
  69. ;----------------------------------------------------------------------------
  70. ;End of file:    T_SETCLK.DOC
  71. ;----------------------------------------------------------------------------
  72.